﻿using System.Data;

namespace DAL
{
    public static class DalCreateAutoCode
    {
        private static readonly clsConnect Cls = new clsConnect();
        public static DataTable GetAutoID(string colunmName, string tableName)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("@ColunmName", colunmName);
            Cls.AddParameter("@TableName", tableName);
            return Cls.GetData("sp_Create_Code");
        }
        public static DataTable GetAuto_ID(string colunmName, string tableName, string num)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("@ColunmName", colunmName);
            Cls.AddParameter("@TableName", tableName);
            Cls.AddParameter("@Num", num);
            return Cls.GetData("sp_Create_Code_New");
        }
    }
}
